import config, { NODE_SETING_ENUM } from '../../config'

export default {
  shape: 'rect',
  attrs: {
    body: {
      ref: 'text',
      refWidth: 16,
      refHeight: 16,
      refX: -8,
      refY: -8,
      stroke: 'none',
      fill: 'none'
    },
    text: {
      fontSize: config.nodeFontSize,
      fill: config.nodeFontColor,
      textAnchor: 'middle', // 水平居中
      textVerticalAnchor: 'middle' // 垂直居中
    }
  },
  label: '文本',
  data: {
    options: [
      NODE_SETING_ENUM.FONT_SIZE,
      NODE_SETING_ENUM.FONT_COLOR,
      NODE_SETING_ENUM.LABEL,
      NODE_SETING_ENUM.TEXT_ANCHOR
    ]
  }
}
